package com.bean;

/**
 * 供货商品商品表实体类
 */

import java.io.Serializable;

public class Commodity implements Serializable {
    /*主键*/
    private Integer id;
    /*类型*/
    private Integer type;
    /*名字*/
    private String name;
    /*商品进价*/
    private Double price;
    /*商品库存*/
    private Integer amount;
    /*描述*/
    private String describes;
    /*供货商id*/
    private Integer providerId;

    /* 商品类型引用 */
    private Type commodityType;

    public Commodity() {
    }
    public Commodity(Integer id) {
        this.id = id;
    }

    public Commodity(Integer id,Integer providerId) {

        this.id = id;
        this.providerId = providerId;
    }

    public Commodity(Integer type, String name, Double price, Integer amount, String describes, Integer providerId) {
        this.type = type;
        this.name = name;
        this.price = price;
        this.amount = amount;
        this.describes = describes;
        this.providerId = providerId;
    }

    public Commodity(Integer id, Integer type, String name, Double price, Integer amount, String describes, Integer providerId) {
        this.id = id;
        this.type = type;
        this.name = name;
        this.price = price;
        this.amount = amount;
        this.describes = describes;
        this.providerId = providerId;
    }

    public Type getCommodityType() {
        return commodityType;
    }

    public void setCommodityType(Type commodityType) {
        this.commodityType = commodityType;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getDescribes() {
        return describes;
    }

    public void setDescribes(String describes) {
        this.describes = describes;
    }

    public Integer getProviderId() {
        return providerId;
    }

    public void setProviderId(Integer providerId) {
        this.providerId = providerId;
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "id=" + id +
                ", type=" + type +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", amount=" + amount +
                ", describes='" + describes + '\'' +
                ", providerId=" + providerId +
                ", CommodityType=" + commodityType +
                '}';
    }


}
